package cn.edu.flink.tutorial.cep.bean;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

// 输入的登录事件样例类
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginEvent {
    Long userId;
    String ip;
    String eventType;
    Long eventTime;

    public static LoginEvent fromString(String s) {
        String[] split = s.split(",");
        return new LoginEvent(Long.parseLong(split[0]), split[1], split[2], Long.parseLong(split[3]));
    }
}
